﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace Sofire.AOP.Settings
{
    internal abstract class AOPSettingBase
    {
        internal abstract void OnLoad(XmlNode node);

        internal static Type GetType(string typeName)
        {
            Type result = null;
            var asses = AppDomain.CurrentDomain.GetAssemblies();
            foreach(var ass in asses)
            {
                try
                {
                    result = ass.GetType(typeName, false);
                }
                catch(Exception)
                {
                    continue;
                }
                if(result != null) return result;
            }

            return Type.GetType(typeName, false);
        }
    }
}
